package com.center.biz.impl;

import com.center.api.model.EduQuestions;
import com.center.api.remote.RemoteEduQuestionsService;
import com.center.biz.dao.EduQuestionsMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduQuestionsService.class)
public class RemoteEduQuestionsServiceImpl implements RemoteEduQuestionsService {

    @Autowired
    private EduQuestionsMapper eduQuestionsMapper;
    @Override
    public int save(EduQuestions eduQuestions) {
        return this.eduQuestionsMapper.insertSelective(eduQuestions);
    }

    @Override
    public int update(EduQuestions eduQuestions) {
        return this.eduQuestionsMapper.updateByPrimaryKeySelective(eduQuestions);
    }

    @Override
    public int delete(int id) {
        return this.eduQuestionsMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<EduQuestions> select(EduQuestions eduQuestions) {
        return this.eduQuestionsMapper.select(eduQuestions);
    }

    @Override
    public EduQuestions getById(int id) {
        return this.eduQuestionsMapper.selectByPrimaryKey(id);
    }
}
